package practice10;

public class Klass {
    private Integer number;
    private Student leader;
    public Klass(int i) {
        this.number=i;
    }

    public Student getLeader() {
        return leader;
    }
    public Integer getNumber() {
        return number;
    }

    public void setNumber(Integer number) {
        this.number = number;
    }

    public String getDisplayName() {
        return "Class "+getNumber();
    }
    public String assignLeader(Student student){
        appendMember(student);
        this.leader = student;
        return leader.getName();
    }
    public void appendMember(Student student){
        if(student.getKlass().getNumber()!=number){
            System.out.println("It is not one of us.\n");
        }
    }

}
